<br>
<div id="alike-block" style="border: 1px solid #EBEBEB; padding-bottom: 10px; padding-left: 20px;">
    <?php
    if (is_array($this->alike) && count($this->alike)) {?>
    <h4 style=" margin-top: 10px; font-size: 14px">Возможно вам будет интересно:</h4>
        <?php foreach ($this->alike as $page) {
            $cat_url = '';
            if (isset($this->pagescats[$page['category_id']])) {
                $cat_url = $this->pagescats[$page['category_id']];
                if (!isset($this->categories[$page['category_id']]))
                    $cat_url = $this->categories[8];
            }
    ?>
            <div><a style="font-size: 12px; font-weight: normal" href="/<?php echo (!empty($cat_url['url']) ? $cat_url['url'] . '/' : '') . $page['url'] ?>"><?php echo $page['title'] ?></a></div>
    <?php
        }
    }
    ?>
</div>
<br/>